package com.cdream.basic.spring.transactional;

import com.cdream.basic.classiccase.miaosha.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cdream
 * @date 2022/7/24
 */
@RestController("/transactional")
public class TransactionalController {
    @Autowired
    public ItemService itemService;
    @Transactional
    @RequestMapping("/updateMysql")
    public void updateMysql(){
       itemService.testMysql();
    }


}
